﻿@model _12._30._2014_MVC.Models.CreateTodoViewModel
@{
    ViewBag.Title = "Create";
}

<h2>Create</h2>

@using (Html.BeginForm())
{
    <div>
        @Html.LabelFor(model => model.Text)
        @Html.TextBoxFor(model => model.Text)
    </div>
    <div>
        <input type="submit" value="Create" />
    </div>
}

<table class="table table-striped table-bordered">
    <tr>
        <th>Text</th>
        <th>Created Date</th>
        <th>Is Completed</th>
        <th>Completed Date</th>
    </tr>
    @foreach (var todo in Model.Todos)
    {
        <tr>
            <td>@todo.Text</td>
            <td>@todo.DateCreated</td>
            <td>@todo.IsCompleted</td>
            <td>@todo.DateCompleted</td>
        </tr>
    }
</table>